--TEST--
Check for output api: pdl_export()
--FILE--
<?php
ini_set('pdlogger.output_dir', '/tmp');
pdl_enable(true);
pdl_start();
pdl_watch(0);

pdl_info("test", "info"); $info_line = __LINE__;
pdl_warning("test", "warning"); $warning_line = __LINE__;

$export = pdl_export();
list($info, $warning) = $export;

echo "Export records:\n";
echo "export array size = " . count($export) . "\n";
echo "info[level] = " . $info['level'] . "\n";
echo "info[label] = " . $info['label'] . "\n";
echo "info[msg] = " . $info['msg'] . "\n";
echo "info[line] is " . ($info_line == $info['line'] ? 'right' : 'wrong') . "\n\n";

echo "warning[level] = " . $warning['level'] . "\n";
echo "warning[label] = " . $warning['label'] . "\n";
echo "warning[msg] = " . $warning['msg'] . "\n";
echo "warning[line] is " . ($warning_line == $warning['line'] ? 'right' : 'wrong');

pdl_stop();
pdl_reset();
?>
--EXPECT--
Export records:
export array size = 2
info[level] = 1
info[label] = test
info[msg] = info
info[line] is right

warning[level] = 2
warning[label] = test
warning[msg] = warning
warning[line] is right
